<?php

/**
 * ViewLgComptagePagination filter form base class.
 *
 * @package    SdCommerce
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 29570 2010-05-21 14:49:47Z Kris.Wallsmith $
 */
abstract class BaseViewLgComptagePaginationFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormFilterInput(),
      'comtage_id'         => new sfWidgetFormFilterInput(),
      'stok_id'            => new sfWidgetFormFilterInput(),
      'stock_idarticle'    => new sfWidgetFormFilterInput(),
      'stock_iddep'        => new sfWidgetFormFilterInput(),
      'art_idcateg'        => new sfWidgetFormFilterInput(),
      'qte_disp'           => new sfWidgetFormFilterInput(),
      'qte_relle'          => new sfWidgetFormFilterInput(),
      'stock_reel'         => new sfWidgetFormFilterInput(),
      'ecart'              => new sfWidgetFormFilterInput(),
      'casse'              => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'perimer'            => new sfWidgetFormChoice(array('choices' => array('' => 'yes or no', 1 => 'yes', 0 => 'no'))),
      'reference'          => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'designation'        => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'libelle'            => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'LibelleDepartement' => new sfWidgetFormFilterInput(array('with_empty' => false)),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'comtage_id'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'stok_id'            => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'stock_idarticle'    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'stock_iddep'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'art_idcateg'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'qte_disp'           => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'qte_relle'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'stock_reel'         => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'ecart'              => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'casse'              => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'perimer'            => new sfValidatorChoice(array('required' => false, 'choices' => array('', 1, 0))),
      'reference'          => new sfValidatorPass(array('required' => false)),
      'designation'        => new sfValidatorPass(array('required' => false)),
      'libelle'            => new sfValidatorPass(array('required' => false)),
      'LibelleDepartement' => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('view_lg_comptage_pagination_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ViewLgComptagePagination';
  }

  public function getFields()
  {
    return array(
      'id'                 => 'Number',
      'comtage_id'         => 'Number',
      'stok_id'            => 'Number',
      'stock_idarticle'    => 'Number',
      'stock_iddep'        => 'Number',
      'art_idcateg'        => 'Number',
      'qte_disp'           => 'Number',
      'qte_relle'          => 'Number',
      'stock_reel'         => 'Number',
      'ecart'              => 'Number',
      'casse'              => 'Boolean',
      'perimer'            => 'Boolean',
      'reference'          => 'Text',
      'designation'        => 'Text',
      'libelle'            => 'Text',
      'LibelleDepartement' => 'Text',
    );
  }
}
